package com.alone.wchat;

import com.alone.wchat.admin.config.EnvironmentConfig;
import com.alone.wchat.admin.listen.ApplicationReadyEventListener;
import net.dreamlu.boot.annotation.EnableDreamBoot;
import net.dreamlu.boot.runer.DreamApplication;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ImportResource;

/**
 * 启动入口
 */
@SpringBootApplication
@ImportResource(value = "classpath:spring/spring-bean.xml")
public class Application {
	public static void main(String[] args) {
		System.out.println("***************************************************************");
		System.out.println("启动adminBackend...");

		SpringApplication app = new SpringApplication(Application.class);

		app.setAdditionalProfiles(EnvironmentConfig.getActiveProfile());

		app.addListeners(new ApplicationReadyEventListener());
		app.run(args);
	}


}
